<!DOCTYPE html>
<style>
  #t1::first-letter { color: white }
  #t1::first-line { background: red }
  #t1.green::first-line { background: green }
</style>
<div id="t1">
  First letter should be white, and the first line should have a green
  background.
</div>
<script>
  if (window.testRunner)
    testRunner.waitUntilDone();

    requestAnimationFrame(() => {
      t1.className = "green";
      if (window.testRunner)
        testRunner.notifyDone();
    });
</script>
